import { setupWorker, rest } from "msw";

const worker = setupWorker(
  rest.post("/api/payment", (req, res, ctx) => {
    // 模拟支付成功
    return res(
      ctx.status(200),
      ctx.json({
        success: true,
        message: "Payment successful",
        transactionId: "tx_123456789",
      }),
    );
  }),
);

export default worker;
